var mongoose = require('../db')

var Schema = mongoose.Schema

var commentSchema = new Schema({
    content: {
        type:String,
        required: true
    },
    created_time: {
        type: Date,
        default: Date.now
    },
    thumbs: { //点赞
        type: Array
    },
    uId: { // 用户id
        type: Schema.Types.ObjectId,
        required: true
    },
    tId: { // 话题id
        type: Schema.Types.ObjectId,
        required: true
    }
})

module.exports = mongoose.model('Comment', commentSchema)